package com.algrithom.dp;

import java.util.Scanner;

public class StringCon {
    
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();
        System.out.println(findCom1(str,str.length() - 1));
    }
    
    private static int findCom1(String num,int i){
        if (i == 0) {
            return 1;
        } else if (i == 1) {
            int value = Integer.parseInt(String.valueOf(num.charAt(i - 1)).concat(String.valueOf(num.charAt(i))));
            if (value > 26) {
                return 1;
            } else {
                return 2;
            }
        } else {
            int value = Integer.parseInt(String.valueOf(num.charAt(i - 1)).concat(String.valueOf(num.charAt(i))));
            if (value > 26) {
                return findCom1(num,i - 1);
            } else {
                return findCom1(num,i - 1) + findCom1(num,i - 2);
            }
        }
    }
    
    private static int findCom(String num){
        char[] letter = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'};
        int len = num.length();
        
        for (int i = 0; i < len; i++) {
            int i1 = Integer.parseInt(String.valueOf(num.charAt(i)));
            if (i1 != 0) {
                System.out.print(letter[i1 - 1]);
            }
        }
        
        for (int i = 0; i < len; i++) {
            int numValue = Integer.parseInt(String.valueOf(num.charAt(i)).concat(String.valueOf(num.charAt(i + 1))));
            if (i > 0 && numValue < 26) {
                System.out.print("");
            }
        }
        return 0;
    }
}
